/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.menosehmais.business;

import br.com.caelum.vraptor.ioc.Component;
import br.com.menosehmais.framework.business.CrudBusinessObject;
import br.com.menosehmais.model.PortletClickDO;
import br.com.menosehmais.model.PortletDO;
import br.com.menosehmais.model.UsuarioDO;
import br.com.menosehmais.persistence.ClickPortletDAO;

/**
 *
 * @author Junior JAFJ
 */
@Component
public class ClickPortletBO extends CrudBusinessObject<PortletClickDO, ClickPortletDAO> {

    public ClickPortletBO( ClickPortletDAO dao ){
        super(dao);
    }

    public long getClicks(PortletDO portletDO, UsuarioDO usuarioDO) {
        return dao.countByPortletId(portletDO.getId(), usuarioDO.getId());
    }
    
}